function StockCtrl($rootScope, $scope, log, stock) {
    $scope.$on('entry', function () {
        $rootScope.$broadcast('startAsync');
        stock.getData().then(function (result) {
            $rootScope.$broadcast('endAsync');
            if (result.status) {
                log.info("Stock result OK");
                var data = result.data.data.query;
                $scope.stocks = data.results.quote;
            } else {
                log.warn("Stock result error.");
            }
        });
    });
};